package com.zqx.visitor.concreteelement;

import com.zqx.visitor.abstractelement.Employee;
import com.zqx.visitor.abstractvisitor.Department;
import lombok.Getter;
import lombok.Setter;

/**
 * description: 具体元素类
 * @author zqx
 * @date 2018/09/06
 */
@Getter
@Setter
public class ParttimeEmployee implements Employee {
    private String name;//姓名
    private double hourWage;//时薪
    private int workTime;//工作时间

    public ParttimeEmployee(String name, double hourWage, int workTime) {
        this.name = name;
        this.hourWage = hourWage;
        this.workTime = workTime;
    }

    @Override
    public void accept(Department handler) {
        handler.visit(this);//调用访问者的访问方法
    }
}
